package com.guiassysdesigners.service.impl;

import java.util.List;

import javax.jws.WebService;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;

import com.guiassysdesigners.model.Suggestion;
import com.guiassysdesigners.model.User;
import com.guiassysdesigners.service.FormValidationException;
import com.guiassysdesigners.service.UserExistsException;


/**
 * Web Service interface so hierarchy of Generic Manager isn't carried through.
 */
@WebService
@Path("/suggestions")
public interface SuggestionService {
    /**
     * Retrieves a suggestion by suggestionId.  An exception is thrown if suggestion not found
     *
     * @param suggestionId the identifier for the suggestion
     * @return Suggestion
     */
    @GET
    @Path("{id}")
    Suggestion getSuggestion(@PathParam("id") String suggestionId);


    /**
     * Retrieves a list of all suggestions.
     *
     * @return List
     */
    @GET
    List<Suggestion> getListSuggestion();

    /**
     * Saves a suggestion's information
     *
     * @param suggestion the suggestion's information
     * @return updated suggestion
     */
    @POST
    Suggestion saveSuggestion(Suggestion suggestion) throws FormValidationException;

    /**
     * Removes a suggestion from the database by their suggesstionId
     *
     * @param suggestionId the suggestion's id
     */
    @DELETE
    void removeSuggestion(String suggestionId);
}
